Skip to content

Conversation

@gouttegd
Copy link
Contributor

Resolves [#467]

  • docs/ have been added/updated if necessary
  • make test has been run locally
  • [ ] tests have been added/updated (if applicable)
  • CHANGELOG.md has been updated.

If you are proposing a change to the SSSOM metadata model, you must

  • provide a full, working and valid example in examples/
  • provide a link to the related GitHub issue in the see_also field of the linkml model
  • provide a link to a valid example in the see_also field of the linkml model
  • make sure any new slot is annotated with the appropriate added_in annotation
  • run SSSOM-Py test suite against the updated model

This PR adds a new mapping record slot called cardinality_scope, intended to precise the meaning of the value of the mapping_cardinality slot.

If empty, it means that the cardinality is relative to the entire set (which corresponds to the current definition of mapping_cardinality, and therefore ensures backwards compatibility). If non-empty, it is expected to be a list of slots that are used to define the subset (the "scope") of mapping records in which the cardinality has been computed.

For example, a cardinality scope of (predicate_id, object_source) means that the cardinality is computed over the subset of mapping records that have the same predicate and whose objects come from the same source.

The new slot is propagatable, because it is assumed that in most mapping sets, the cardinality for all records will be computed in the same way (though there's no obligation for that), and so all records will share the same scope.

Add a new mapping record slot called `cardinality_scope`, intended to
precise the meaning of the value of the `mapping_cardinality` slot.

If empty, it means that the cardinality is relative to the entire set
(which corresponds to the current definition of `mapping_cardinality`,
and therefore ensures backwards compatibility). If non-empty, it is
expected to be a list of slots that are used to define the subset (the
"scope") of mapping records in which the cardinality has been computed.

For example, a cardinality scope of (`predicate_id`, `object_source`)
means that the cardinality is computed over the subset of mapping
records that have the same predicate and whose objects come from the
same source.

The new slot is propagatable, because it is assumed that in most mapping
sets, the cardinality for all records will be computed in the same way
(though there's no obligation for that), and so all records will share
the same scope.
Copy link
Collaborator

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a much welcome clarification of that field..

matentzn
matentzn previously approved these changes Jul 31, 2025
@matentzn matentzn requested a review from ehartley July 31, 2025 15:17
ehartley
ehartley previously approved these changes Aug 1, 2025
Copy link
Contributor

@ehartley ehartley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes look good. My only suggestion is to update the list of propagatable slots in the spec-model.md file.

@gouttegd gouttegd dismissed stale reviews from ehartley and matentzn via 9118dd3 August 1, 2025 08:30
@gouttegd gouttegd requested review from ehartley and matentzn August 1, 2025 13:26
@matentzn matentzn merged commit 3421a87 into master Aug 1, 2025
4 checks passed
@matentzn matentzn deleted the add-cardinality-scope branch August 1, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants